//login-patient-info
interface PatientInfo {
  username: string;
  userId: number;
  token: string;
  role?:
    | "DOCTOR"
    | "HEALTHCARE"
    | "INSTITUTION"
    | "RESEARCHER"
    | "ADMIN"
    | null;
  email?: string | null;
}

//patient-diagnosis-info:need idcard
interface PatientDiagInfo {
  name: string;
  idCard: string;
  age: number;
  sex: "男" | "女";
  leftEye: File | null;
  rightEye: File | null;
  patientId?: number | null;
  recordId?: number | null;
  reportId?: number | null;
  reportGenerated?: boolean;
  language?: "ZH" | "EN";
  format?: "pdf" | "png" | "html";
  generating?: boolean;
}
interface PatientStoreState {
  patients: PatientDiagInfo[];
}

//patient-page-list-info
//page-pageSize
interface PageInfo {
  page: number;
  pageSize: number;
}
//patient-page-list
interface PatientPageListItem {
  age: number;
  id: number;
  idCard: string;
  name: string;
  sex: "男" | "女";
}
interface PatientPageList {
  patients: PatientPageListItem[];
}

//patient-record-find
interface PatientRecordItem {
  diagnosisTime: string;
  id: number;
  imageId: number;
  leftDiseaseResults: string[];
  rightDiseaseResults: string[];
  patientId: number;
}
interface PatientRecord {
  records: PatientRecordItem[];
}

//patient-appointment-list
interface PatientAppointmentItem {
  appointmentTime: string | null;
  cancelTime: string | null;
  confirmTime: string | null;
  createTime: string | null;
  doctorId: number;
  id: number;
  patientId: number;
  status: "PENDING" | "CONFIRMED" | "CANCELLED";
  doctorName?: string | null;
}
interface PatientAppointment {
  appointments: PatientAppointmentItem[];
}

//patient-own-info-change-and-bind
interface PatientUpdateForm {
  username: string;
  password: string;
}
interface PatientBindForm {
  idCard: string;
  age: number;
  sex: "男" | "女";
}

export {
  PatientInfo,
  PatientDiagInfo,
  PatientStoreState,
  PageInfo,
  PatientPageList,
  PatientPageListItem,
  PatientRecordItem,
  PatientRecord,
  PatientAppointmentItem,
  PatientAppointment,
  PatientUpdateForm,
  PatientBindForm,
};
